package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PurOrderReceiveMapper;
import com.ruoyi.system.domain.PurOrderReceive;
import com.ruoyi.system.service.IPurOrderReceiveService;
import com.ruoyi.common.core.text.Convert;

/**
 * 采购订单收货记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-16
 */
@Service
public class PurOrderReceiveServiceImpl implements IPurOrderReceiveService 
{
    @Autowired
    private PurOrderReceiveMapper purOrderReceiveMapper;

    /**
     * 查询采购订单收货记录
     * 
     * @param receiveId 采购订单收货记录主键
     * @return 采购订单收货记录
     */
    @Override
    public PurOrderReceive selectPurOrderReceiveByReceiveId(Long receiveId)
    {
        return purOrderReceiveMapper.selectPurOrderReceiveByReceiveId(receiveId);
    }

    /**
     * 查询采购订单收货记录列表
     * 
     * @param purOrderReceive 采购订单收货记录
     * @return 采购订单收货记录
     */
    @Override
    public List<PurOrderReceive> selectPurOrderReceiveList(PurOrderReceive purOrderReceive)
    {
        return purOrderReceiveMapper.selectPurOrderReceiveList(purOrderReceive);
    }

    /**
     * 新增采购订单收货记录
     * 
     * @param purOrderReceive 采购订单收货记录
     * @return 结果
     */
    @Override
    public int insertPurOrderReceive(PurOrderReceive purOrderReceive)
    {
        return purOrderReceiveMapper.insertPurOrderReceive(purOrderReceive);
    }

    /**
     * 修改采购订单收货记录
     * 
     * @param purOrderReceive 采购订单收货记录
     * @return 结果
     */
    @Override
    public int updatePurOrderReceive(PurOrderReceive purOrderReceive)
    {
        return purOrderReceiveMapper.updatePurOrderReceive(purOrderReceive);
    }

    /**
     * 批量删除采购订单收货记录
     * 
     * @param receiveIds 需要删除的采购订单收货记录主键
     * @return 结果
     */
    @Override
    public int deletePurOrderReceiveByReceiveIds(String receiveIds)
    {
        return purOrderReceiveMapper.deletePurOrderReceiveByReceiveIds(Convert.toStrArray(receiveIds));
    }

    /**
     * 删除采购订单收货记录信息
     * 
     * @param receiveId 采购订单收货记录主键
     * @return 结果
     */
    @Override
    public int deletePurOrderReceiveByReceiveId(Long receiveId)
    {
        return purOrderReceiveMapper.deletePurOrderReceiveByReceiveId(receiveId);
    }
}
